package org.datastealer.controller;

import org.datastealer.service.CustomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Note：
 *
 * @author ：mengjw
 * @description：用户自定义sql控制层
 * @date ：Created in 2020/9/21
 */
@RestController
@RequestMapping("/datastealer")
public class CustomController {

    @Autowired
    private CustomService customService;

    @PostMapping("/runCustomSql")
    public Object runCustomSql(@RequestBody String sql) {
        return customService.runCustomSql(sql);
    }

}